package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaWorkerPhoto;
import com.ruoyi.system.mapper.JiajiaWorkerPhotoMapper;
import com.ruoyi.system.service.IJiajiaWorkerPhotoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社工相册Service业务层处理
 * 
 * @author knd
 * @date 2021-10-13
 */
@Service
public class JiajiaWorkerPhotoServiceImpl implements IJiajiaWorkerPhotoService
{
    @Autowired
    private JiajiaWorkerPhotoMapper jiajiaWorkerPhotoMapper;

    /**
     * 查询社工相册
     * 
     * @param id 社工相册主键
     * @return 社工相册
     */
    @Override
    public JiajiaWorkerPhoto selectJiajiaWorkerPhotoById(Long id)
    {
        return jiajiaWorkerPhotoMapper.selectJiajiaWorkerPhotoById(id);
    }

    /**
     * 查询社工相册列表
     * 
     * @param jiajiaWorkerPhoto 社工相册
     * @return 社工相册
     */
    @Override
    public List<JiajiaWorkerPhoto> selectJiajiaWorkerPhotoList(JiajiaWorkerPhoto jiajiaWorkerPhoto)
    {
        return jiajiaWorkerPhotoMapper.selectJiajiaWorkerPhotoList(jiajiaWorkerPhoto);
    }

    /**
     * 新增社工相册
     * 
     * @param jiajiaWorkerPhoto 社工相册
     * @return 结果
     */
    @Override
    public int insertJiajiaWorkerPhoto(JiajiaWorkerPhoto jiajiaWorkerPhoto)
    {
        return jiajiaWorkerPhotoMapper.insertJiajiaWorkerPhoto(jiajiaWorkerPhoto);
    }

    /**
     * 修改社工相册
     * 
     * @param jiajiaWorkerPhoto 社工相册
     * @return 结果
     */
    @Override
    public int updateJiajiaWorkerPhoto(JiajiaWorkerPhoto jiajiaWorkerPhoto)
    {
        return jiajiaWorkerPhotoMapper.updateJiajiaWorkerPhoto(jiajiaWorkerPhoto);
    }

    /**
     * 批量删除社工相册
     * 
     * @param ids 需要删除的社工相册主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerPhotoByIds(String ids)
    {
        return jiajiaWorkerPhotoMapper.deleteJiajiaWorkerPhotoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除社工相册信息
     * 
     * @param id 社工相册主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerPhotoById(Long id)
    {
        return jiajiaWorkerPhotoMapper.deleteJiajiaWorkerPhotoById(id);
    }
}
